<?php
/**
 * Created by PhpStorm.
 * User: ming
 * Date: 2020/12/5
 * Time: 12:02
 */
include_once("../../config.php");
$host = $_SERVER['HTTP_HOST'];//取得进入所输入的域名
$theme_folder=host_theme($host);
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: *");
header('Access-Control-Allow-Headers:*');
header('Content-Type:application/json');

include_once ("../../front/". $theme_folder ."/connection.php");
function out($msg="",$code=0,$data=array()){
    $array = array(
        "msg" => $msg,
        "code" => $code,
        "data" => $data
    );
    return json_encode($array);
}

function getpost(){
    $post = file_get_contents('php://input');
    return json_decode($post,true);
}